package com.jxnu.duewang.zmly.zmly.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2016/12/6.
 */
public class DownloadAdapter extends FragmentPagerAdapter {
    private List<String> string;
    private List<Fragment> list;
    public DownloadAdapter(FragmentManager fm, List<String> string,List<Fragment> list) {
        super(fm);
        this.string = string;
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return string.get(position);
    }
}
